package com.esri.core.geometry;

/* loaded from: classes.dex */
class NumberUtils {
    public static final double TheNaN = Double.NaN;

    public static double NaN() {
        return Double.NaN;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static int a(int i, int i2, int i3) {
        return i < i2 ? i2 : i > i3 ? i3 : i;
    }

    static long a(long j, long j2, long j3) {
        return j < j2 ? j2 : j > j3 ? j3 : j;
    }

    public static double doubleEps() {
        return 2.220446049250313E-16d;
    }

    public static double doubleMax() {
        return Double.MAX_VALUE;
    }

    public static int hash(int i) {
        int i2 = 177573 + (i & 255);
        int i3 = (i2 << 5) + i2 + ((i >> 8) & 255);
        int i4 = (i3 << 5) + i3 + ((i >> 16) & 255);
        return Integer.MAX_VALUE & ((i4 << 5) + i4 + ((i >> 24) & 255));
    }

    public static int hash(int i, int i2) {
        int i3 = (i << 5) + i + (i2 & 255);
        int i4 = (i3 << 5) + i3 + ((i2 >> 8) & 255);
        int i5 = (i4 << 5) + i4 + ((i2 >> 16) & 255);
        return ((i5 << 5) + i5 + ((i2 >> 24) & 255)) & Integer.MAX_VALUE;
    }

    public static int intMax() {
        return Integer.MAX_VALUE;
    }

    public static double negativeInf() {
        return Double.NEGATIVE_INFINITY;
    }

    public static double positiveInf() {
        return Double.POSITIVE_INFINITY;
    }

    public static int sizeOf(byte b) {
        return 1;
    }

    public static int sizeOf(double d) {
        return 8;
    }

    public static int sizeOf(int i) {
        return 4;
    }

    public static int sizeOf(long j) {
        return 8;
    }

    public static int sizeOfDouble() {
        return 8;
    }

    public static double snap(double d, double d2, double d3) {
        return d < d2 ? d2 : d > d3 ? d3 : d;
    }

    NumberUtils() {
    }

    public static boolean isNaN(double d) {
        return Double.isNaN(d);
    }

    public static int hash(double d) {
        long doubleToLongBits = Double.doubleToLongBits(d);
        return hash((int) (doubleToLongBits ^ (doubleToLongBits >>> 32)));
    }

    public static int hash(int i, double d) {
        long doubleToLongBits = Double.doubleToLongBits(d);
        return hash(i, (int) (doubleToLongBits ^ (doubleToLongBits >>> 32)));
    }

    public static long doubleToInt64Bits(double d) {
        return Double.doubleToLongBits(d);
    }

    public static int nextRand(int i) {
        return ((i * 1103515245) + 12345) & intMax();
    }
}
